
public class practice_array {
	

	public static void main(String[] args) 
	{
		int[] myarray = {5,8,9,10,2,7,98,1,45,50,7};
		printout(myarray);
		sort(myarray);
		printout(myarray);
	}
	 static  void printout(int [] input)
	{
		 System.out.println();
		for (int i = 0;i<input.length;i++)
			System.out.print(input[i]+"  ");
	}

	 static  void sort(int[] input_array)
	 {

		 for (int resort = 0; resort < 10;resort++)
		 {
	
			
			 for (int i  = 0;i<input_array.length -1;i++)
			 { 
				 if (input_array[i]>input_array[i+1])
				 {
					 int x = input_array[i];
					 input_array[i] = input_array[i+1];
					 input_array[i+1] = x;
				 }
				
			 }

		 }
	 }
}
